#include "shm.hpp"
#include "fifo.hpp"

int main()
{
    Shm s(PATH_NAME, PROJ_ID, CREATER);
    Fifo fifo(".", "myFifo");
    FifoOper fifoOper(".", "myFifo");
    fifoOper.OpenWithRead();
    char *mem = (char *)s.vrittalAddr();
    while (true)
    {
        if (fifoOper.Read())
        {
            std::cout << mem << std::endl;
        }
        else
        {
            break;
        }
    }
    fifoOper.Close();

    return 0;
}